package game;

import java.awt.Font;
import java.awt.FontFormatException;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.lwjgl.opengl.GL11;
import AGFX.F3D.F3D;
import AGFX.F3D.Camera.TF3D_Camera;
import AGFX.F3D.Font.TF3D_Font_TTF;
import AGFX.F3D.Light.TF3D_Light;
import AGFX.F3D.Model.TF3D_Model;

/**
 * @author Baskervil
 *
 */
public class TEndScreen {
	
	public TF3D_Camera Camera;
	public TF3D_Model carpet;
	public boolean visible = false; 
	
	public TEndScreen(){
		F3D.Worlds.CreateWorld("THEEND");
		F3D.Worlds.SetWorld("THEEND");

		F3D.Viewport.Clear(0f, 0f, 0f, 1f);
		
		this.Camera = new TF3D_Camera("End_Camera");
		this.Camera.SetPosition(0.0f, 0.0f,1f);

		this.Camera.ctype = F3D.CAMERA_TYPE_FPS;
		
		F3D.Cameras.Add(this.Camera);
		F3D.Worlds.SetCamera(this.Camera);
	
		
		// Add light to scene
		TF3D_Light light = new TF3D_Light("light_2", 0);
		light.SetPosition(0f, 0f, -1f);
		light.spot_constant_att = 0.6f;
		light.Enable();	
		

		
		this.carpet = new TF3D_Model("carpetend");
		this.carpet.AssignMesh("abstract::carpet.a3da");
		this.carpet.SetPosition(0f, 0f, -10f);
		this.carpet.SetRotation(-25, 0, 0);
	}
	
	public float px(int percento){
		return (F3D.Config.r_display_width/100)*percento;
	}

	public float py(int percento){
		return (F3D.Config.r_display_height/100)*percento;
	}

}
